<template>
  <div>
    <div class="div_rqlist">
      <span @click="span_rqlist"> < </span>
      <span>人气列表</span>
      <span></span>
    </div>
    <div>
      <ul class="ul_rqlists">
        <li v-for="(item, index) in rqlists" :key="index">
          <img :src="item.pic" />
          <p>{{ item.name }}</p>
          <p>￥{{ item.originalPrice }}</p>
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      rqlists: [],
    };
  },
  mounted() {
    this.$APL.KANJIA().then((res) => {
      console.log(res.data.data);
      this.rqlists = res.data.data;
    });
  },
  methods: {
    span_rqlist() {
      window.history.back();
    },
  },
};
</script>

<style lang="scss">
.div_rqlist {
  width: 100%;
  height: 1rem;
  background: goldenrod;
  display: flex;
  align-items: center;
  justify-content: space-around;
  //   position: relative;
  span {
    &:nth-child(1) {
      font-size: 0.5rem;
    }
  }
}
.ul_rqlists {
  width: 100%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  li {
    width: 45%;
    margin-top: 0.2rem;
    img {
      width: 100%;
      height: 5rem;
    }
    p {
      height: 0.5rem;
      &:nth-child(3) {
        color: red;
      }
    }
  }
}
</style>